#pragma once
typedef int Element_t;
typedef class {
public:
	Element_t* data;
	int *size;
	int* parent;
	int n;
}QuickUnionSet;

QuickUnionSet* createQUSet(int n);
void releaseQUSet(QuickUnionSet* set);
void initQUSet(QuickUnionSet* set,const Element_t data[]);

int isSame(QuickUnionSet* set, Element_t a, Element_t b);
void unioncNode(QuickUnionSet* set, Element_t a, Element_t b);